<?php
/* @var $this ServiceController */
/* @var $model Service */

$this->breadcrumbs=array(
	'Services'=>array('index'),
	'Create',
);

?>

<?php 
Yii::app()->clientScript->registerScript('search', "
$('.add-button').click(function(){
	$('.add-form').toggle();
	return false;
});
");
?>

		<table width="100%" border="0" cellpadding="0" cellspacing="0">
        <tr class="texteSimple">
          <td>&nbsp;</td>
        </tr>		
        <tr>
          <td align="center" class="titresIndex">Gestion des Services</td>
        </tr>
        <tr>
          <td>
			<table width="100%" border="0" cellpadding="0" cellspacing="0" id="pageFooter">     
	        <tr>
	          <td>
				<?php echo CHtml::link('Nouveau type de Service','#',array('class'=>'add-button')); ?>
				<div class="add-form" style="display:none">
				<?php echo $this->renderPartial('_form', array('model'=>$model)); ?>
				</div>
			  </td>
			</tr>
	        <tr>
	          <td class="texteSimple"><br>	
				<?php $this->widget('zii.widgets.grid.CGridView', array(
					'id'=>'service-grid',
					'dataProvider'=>$model->search(),
					'cssFile' => Yii::app()->baseUrl . '/css/dbs.css',
					'itemsCssClass' => 'premiumGrid',						
					'columns'=>array(
						'NameFr',
						'NameEn',
						array(
							'class'=>'CButtonColumn',
							'template' => '{update} {delete}',
							'updateButtonImageUrl' => Yii::app()->baseUrl . '/images/icon_modify.png',
							'deleteButtonImageUrl' => Yii::app()->baseUrl . '/images/icon_delete.png',
						),
					),
				)); ?>
		 		</td>
			</tr>
			</table>
		  </td>
		</tr>
		</table>
